The present invention relates to computer systems (particularly small computer systems), and methods of operating computer systems. Typically, when power is turned on or the computer is reset, the computer will recognize attached peripheral devices and operate them correctly as long as the computer and the devices are properly configured. After the computer system is booted it enters a normal operating mode. Unfortunately, if another peripheral device, a mouse for example, is connected to the computer after the computer is in a normal operating mode (i.e., it has been booted), it will not operate correctly. The present invention solves this problem by emulating a peripheral device, such as a mouse or digitizing pad, in the computer's keyboard controller.
To better understand the present invention, the following paragraphs provide some technological background.
A. Handling Keyboard Inputs
One of the basic choices in an interactive computer architecture is how to detect and respond to user inputs on the computer.
1. Evolution of the Industry-Standard Architecture
In the original IBM PC, the keyboard was located in a separate housing the system chassis, and was connected to the chassis by a cable with a standard interface definition (which was changed in the transition from XT to AT). The keyboard housing was powered, through its cable, from the system chassis. The keyboard housing include a separate microprocessor which was used to constantly monitor user keystrokes, and this processor relayed keystroke events to the CPU microprocessor through an interrupt-driven architecture. See generally Norton, "Inside the PC Keyboard," PC WORLD vol. 1, no.4, pp. 190-197 (1983), which is hereby incorporated by reference; Mefford, "An in-depth exploration of the PC keyboard and its interrupt service routines," MICROSOFT SYSTEMS JOURNAL vol. 5, no. 3 (May 1990) at p. 22, which is hereby incorporated by reference.
In this architecture, the keyboard microprocessor monitors the individual keystrokes to detect any changes of state (i.e. the user presses or releases any key). Whenever a keystroke is detected, the keyboard microprocessor sends a high-priority interrupt to the CPU. When the CPU services this interrupt, it retrieves the key event code from the keyboard microprocessor, translates it to determine appropriate character and/or status codes, and loads this information into a software buffer. The application software can then read this software buffer, in due course, as needed. This can be done by a software interrupt, or by a direct read to the address of the area reserved for the keyboard buffer.
This architecture has generally been-retained through numerous stages of evolution of the industry-standard architecture (ISA).
In the industry-standard architecture, the keyboard microprocessor has generally been an Intel 8048, but several related chips have also been used. See Levine, "Keyboard Mfrs. Scramble for Microcontroller," ELECTRONIC NEWS vol. 30, no. 1482, p. 50 (Jan. 30, 1984), which is hereby incorporated by reference. Other chips used have included the 8748 (which includes EPROM), the 8031 (ROM-less), the 8051 (mask-programmed), and the 8042 (the original keyboard controller whose interface is emulated by the more recent chips).
2. Recent Changes
The most significant departures from this keyboard interface architecture have occurred very recently. In laptop and smaller computers, the keyboard is often integrated into the same chassis as the CPU. Moreover, the low-power needs of such computers have forced reconsideration of architectural blocks such as the keyboard.
Thus, more recent hardware architectures have begun to handle keystroke inputs in a slightly different way. If the keyboard microprocessor is located in the system chassis, then the simple keystroke-monitoring functions can be combined with other functions too.
3. Keyboards vs. Pointing Devices
For any graphical user interface, a simple keyboard is an inadequate channel for user input: a user also needs some very rapid way to select a point from the two-dimensional display space.
A variety of pointing devices have been used in computer interfaces, including mice, touchpads, trackballs, joysticks, light pens, and touch-sensitive screens. All of these devices work well on the desktop where power and space are not major concerns. They do not work as well when used with a portable computer.
B. System Startup
1. Startup Software (POST, Bootstrap, etc.)
A computer system normally includes a number of complex hardware components (chips and subsystems). When power is first applied to a computer (or when the user triggers a reset), the various hardware elements (chips and subsystems) will each have their own internal procedures (reset procedures) to regain a stable and known state. However, at some point (if the hardware is intact), these reset procedures will have ended, and at this point the CPU performs various important overhead tasks under software control. These overhead tasks include, for example, performing sanity checks on system hardware, issuing diagnostic signals (such as sounding beeps through a speaker or turning on LEDs), and permitting the user to branch into an NVRAM configuration program. This phase of operation is generally referred to as "POST" (Power-On-Self-Test). During POST the CPU determines the configuration of the computer system, thereby identifying the peripheral devices that are attached.
After POST, a "bootstrap" program is run, to permit the CPU to begin execution of other software. For robustness, the POST and bootstrap software is normally stored in read-only memory. The bootstrap program prompts the CPU's execution of the primary operating system software; the primary operating system software can then be used to launch an application program, either-manually or automatically. Depending on how the system has been set up, the boot software may direct program execution into DOS, UNIX, OS/2, or another operating system. This is normally automatic and predetermined, but is manually user-selectable in some systems. However, the choice of operating system is not particularly relevant to the inventions described in the present application.
2. Bootstrap Programs
Every computer system must have some way to begin program execution after a cold start (when the system is turned on). The hardware architecture of a microprocessor (or other CPU) will normally provide for a "reset" operation, which places all of the hardware circuits in a known electrical state; but it is still necessary to start the CPU's execution of a desired program. For example, in the very early days of computing, some computer systems would be manually configured to read in a "bootstrap loader" program at startup. This bootstrap program was a simple program that loaded in, and started execution of, another sequence of instructions which were the beginning of the desired program. Bootstrap programs are often referred to simply as "boot" software.
As a more recent example, Intel 80.times.86 microprocessors, after a hardware reset, attempt to begin program execution from a specific memory address. That is, the microprocessor will read, and attempt to execute as a microprocessor instruction, the contents of that memory location. The specific memory location used by the 80.times.86 family is xxxFFFF0h, i.e., 16 bits below the top of the memory space. Other microprocessors may use a different starting address, but similar principles apply. If a branch instruction is found at this address, program execution continues at whatever address the microprocessor is instructed to branch to.
Thus, this initial target address is the entry point for every session of use. This address is normally used to start programs that must be run every time the computer is used.
3. "Basic Input/Output System" Software (BIOS)
In many types of modern personal computers (and in all "IBM-compatible" personal computers), a key part of the system software is a "basic input/output system" (BIOS) program. The BIOS program contains frequently-used routines for interrupt handling, for interfacing the CPU with key peripherals, such as a keyboard, and so forth. The term "peripheral," "peripheral device," or "peripheral component" normally refers to those components of a computer system that are not on the motherboard, i.e., which must be addressed through a system bus or through an external port. However, the usage of this term is somewhat variable; sometimes it is used to refer to any I/O device, or only to refer to components which are optional add-ons. The BIOS software provides some degree of machine-independence. However, this independence is not always fully exploited by the available commercial software. Many programs bypass the BIOS software and directly access the underlying hardware addresses or devices. See Glass, "The IBM PC BIOS," Byte, April 1989, pp. 303ff.
For system robustness, the BIOS software itself is normally packaged in non-volatile memory with other key pieces of overhead software, such as POST, boot, and configuration management routines, as well as a pointer to launch the computer into the operating system software. However, in 1991 IBM introduced-a PS/2 system in which the BIOS is at least partially stored on disk. Packaging the BIOS, POST and boot routines in ROM makes a very robust firmware system. Short of hardware damage, it is very difficult for a user to distort the system to the point where it will not start up and run (assuming the operating system software is present). However, this system also provides a considerable degree of flexibility. As the operating system starts up (after the POST and boot routines), the user can remap address pointers to direct BIOS calls away from the standard BIOS routines. (It is also common to map out the entire BIOS code into fast RAM, for greater speed.) Thus, the term "BIOS" is often used more broadly, to refer to the entire collection of basic system routines in ROM or EPROM.
C. Software
1. Operating System Software
The application software will normally interface to an operating system (such as DOS, DOS+Windows, OS/2, UNIX, etc.). The operating system is a background software program which provides an application programming interface (API) for use by the application software. Some operating systems run continuously, or at least start up at regular intervals, even while an application program is running; other operating systems merely provide capabilities that can be invoked by the application software. Thus, the programmers writing application software can write their software to fit the API, rather than having to cater to the peculiarities of a particular machine. See Quedens, "Windows virtual machine." PC Tech Journal vol.5, no.10, pp. 90, 92-3, 95, 97, 99-100, 102 (October 1987), which is hereby incorporated by reference.
2. Device Driver Software
A device driver is a lower-level of operating system software. Typically a device driver interfaces to the actual peripheral hardware components, and provides routines that application software can invoke in order to access hardware components. Thus, the application software can simply make a call to an installed software subroutine, instead of having to find the specifications of each peripheral device and branch accordingly, whenever a peripheral I/O operation is needed. This permits application software to ignore the detailed specifications of peripheral hardware.
Normally, device driver software must contain a description of each target hardware platform. Thus, the software must be revised repeatedly, for reasons which are beyond the control of the companies making peripherals.
In personal computers, installable device drivers were first introduced in DOS 2.0. The role of device drivers has since been expanded, in subsequently introduced operating systems.
In particular, OS/2 provided expanded support for device drivers, including a library of "DevHlp" routines which can be called by device drivers. See generally Duncan, "An examination of the DevHlp API (writing OS-2 bimodal device drivers)," 3 Microsoft Systems Journal no.2 (March 1988) at 39; Schmitt, "Designing drivers for OS/2: I," PC Tech Journal vol.5, no.12, p. 164 (1987); and Schmitt, "Designing drivers for OS/2: II," PC Tech Journal vol.6, no.2, pp.136-155 (February 1988), all of which are hereby incorporated by reference.
3. Application Software
From a system designer's point of view, the application software is, subject only to the minimal constraints of the architectural standards, wholly unpredictable. Common applications include spreadsheets, word processors and publishing programs, databases, games, project managers and a wide variety of others. Inevitably, though, users will also run customized applications and new types of applications.
D. Portable Computers
1. Laptop and Smaller Computers
Portable personal computers were introduced in the early 1980s, and have proven to be very useful and popular. As this market has developed, it has become increasingly clear that users strongly desire systems to have small volume, small weight, physical durability, and long battery-powered lifetime. Thus, small portable computers ("laptop" computers) have proven extremely popular during the late 1980s. Users continue to demand more features, longer time between recharges, and lower weight and volume. This combination of demands is difficult to meet. Moreover, a smaller generation of portable computers, referred to as "subnotebook" computers, is increasingly popular. The smaller form factor will only exacerbate the difficulty of the above tradeoffs.
2. Some Difficulties of Small Size
To meet the weight, volume, and power budgets of small portable computers, much effort has been made, within the limits of acceptable compromise of user comfort and convenience, to re-engineer familiar components to attain the needed portability. For example, almost no laptop or notebook computers have more than two disk drives (typically one floppy drive and one hard drive); the keyboards are smaller than is optimal for touch typists; and the displays are smaller than on common desktop models.
Where such compromises are needed to attain the overriding goal of portability, users readily accept them. However, these compromises must be avoided where possible. Thus, for example, many users will "dock" their laptop or notebook computers, when on their desktops, in order to use better peripherals (faster, larger, more rugged, and/or easier to use) than could be carried with early portable computers.
Portable computers are inherently more susceptible than desktop computers to accident, loss, and theft. Thus, if critical work is being done on a portable computer, backup is even more of a necessity than with a desktop computer.
The quantities of mass storage available on portables have steadily increased, but the cost per byte of the necessary ruggedized drives continues to exceed that of the drives normally used in desktop systems. This disparity seems likely to continue. Similarly, although some small portables use non-volatile solid-state memory to replace disk drives, the cost per byte of such memory is likely to continue to exceed that of conventional mass storage devices.
Laptops normally have a severely limited set of external ports. This limitation is imposed by several factors: first, each external connector takes up precious surface area. Second, each external connector is a point of vulnerability to electrostatic-discharge-induced component failure. Third, each external connector is a possible point of entry for dirt and moisture. Fourth, the possible power required by all connectors must be considered, in calculating the worst-case power budget for a system.
Similar problems arise from the need for bus extension. Internal space is not available for expansion cards, as in a normal personal computer; but expansion needs still exist. Some small computers have brought out key bus lines into an external connector, but of course this is unwieldy. Other small computers have distributed signals through a port to an independently-powered extension bus controller with bus slots that emulate the computer's internal bus.
3. Continuing Advantages of Stationary Personal Computers
The capabilities and cost of both stationary and portable computers have rapidly improved over the years. However, it is likely that stationary personal computers will always have some advantages over lightweight portables: it has always been true that, for a given price, stationary computers have more computing horsepower, larger mass storage, better displays, and better user interfaces (including keyboard, mouse, joystick and/or track ball input devices). These advantages are due to the necessary constraints (of weight, volume, power budget, shock-resistance, and environmental resistance) which necessarily must be met by a small portable computer, and need not be met by a stationary personal computer.
4. Use of Both a Portable and a Stationary Computer
As small portable computers become ever more common, an increasing number of users prefer to use two computers: one for their desktop, and one more for the road. This increasingly common pattern of usage is very convenient for users, but also generates some problems.
One problem that arises is loss of file coherency: a user who edits a file on a secondary machine must transfer that file back to the primary machine before editing the same file on the primary machine.
5. "Docking" a Portable Computer
Users find it very convenient to "dock" a portable computer to a full-size keyboard and/or display. When a portable computer is used in such a configuration, users will also wish to use many of the peripherals (such as printer, modem, fax machine, tape backup devices, or additional disk drives) which are typically available with a desktop computer. This desire becomes more urgent as useful amounts of computing power become more available in portable computers.
Thus, in general, as convenient as small portable computers are, there is some difficulty getting data into and out of them. Often, the only data routes available between a portable and a desktop computer are via a modem or a floppy drive. This has been recognized as a problem, and many vendors have offered external drive connections for small portable computers. Some portable computers have Local Area Network (LAN) interface cards installed, but this is an expensive option and obviously requires access to a compatible LAN.
E. Existing Problems
1. Device Initialization
Problems still exist, despite the enormous improvements made in the field of small computer systems. One problem is that when a small computer'system boots or is reset, the system attempts to perform all initialization (of peripheral devices) at that time. For example, in the popular operating environment known as Windows, a mouse (or other pointing device serving the same functions) must be physically connected at the time Windows initially loads and executes. If the mouse is not connected at that time, it will not operate properly even if connected at a later time.
2. Password Lock--Protecting a Computer System
Password lock mode is used to protect a computer from unauthorized use. During this mode the CPU may still communicate with peripheral devices. However, unsolicited data, data requests, and other signals sent from one or more selectable peripheral devices are not accepted. If one of the selected peripheral devices, such as a mouse, is not connected to a computer while it is in password lock mode, it cannot be initialized and therefore will not operate correctly even after a normal operating mode is resumed.
One situation in which the password lock mode is helpful is with a network server. Because a network server is vital to the operation of a network, it is preferable to prevent unauthorized users from accessing the server while it is performing network functions. A password lock mode can be implemented on the network server to disable the server's keyboard and thereby prevent unauthorized persons from disrupting network operations. In this situation the keyboard controller will still function, in order to transmit signals to the CPU when a user enters the correct password to exit from password lock mode.